{% extends '__base.tpl' %}

{% block head %}
<title>编程达人-app下载</title>
<meta name="Keywords" content="app下载，IOS下载，安卓下载，android下载" />
<meta name="Description" content="app下载，IOS下载，安卓下载，android下载"/>
<!-- build:css -->
    <link rel="stylesheet" type="text/css" href="../../../public/css/page/down.css" />
<!-- endbuild -->
{% endblock %}

{% block body %}
<div class="down-box">
    <div class="down-content">
        <div class="content-tel">
            <img class="qrccode-img" src="../../../public/images/scan-ma.png" alt="code">
            <div class="content-desc">
                扫描二维码<br/>下载手机APP
            </div>
        </div>
        <div class="fontb mt20 clof center" style="font-size: 36px;">你就是下一个编程达人</div>
        <div class="down-link-box clearfix">
           <!-- <a href="/download/app/android.apk" class="fleft iphone">
                App Store 下载
            </a>-->
            <a data-href="/public/download/app/android.apk" href="javascript:;" onclick="toDown(this)" class="android">
                Android 下载
            </a>
        </div>
    </div>
</div>
<!--微信下载提示-->
<div id="share_mask" style="display: none">
    <div class="fullbg"></div>
    <div class="center" style="position:fixed;z-index:10001;left:10px;right:10px;top:10px">
        <p class="tright clof" style="font-size:40px;margin-bottom:40px">&#9794;</p>
        <p class="clof font18" style="line-height:40px">
            点击微信右上角
            <b class="ml10 deg90 mr10">...</b>
            通过浏览器打开下载<br/>
        </p>
    </div>
</div>
{% endblock %}
{% block script %}
{{ super() }}
<script>
    function toDown(obj) {
        var href = obj.dataset.href;
        if(isWeiXin()){
            $('#share_mask').show();
        }else{
            window.open(href);
        }
    }
    function isWeiXin(){
        var ua = window.navigator.userAgent.toLowerCase();
        if(ua.match(/MicroMessenger/i) == 'micromessenger'
                ||ua.match(/MicroMessenger/i) == 'mqqbrowser'){
            return true;
        }else{
            return false;
        }
    }
</script>
{% endblock %}